<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录 - 湖南信息学院</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f5f5;
            color: #333;
            line-height: 1.6;
            background-image: url("media/login-bg.jpg");
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        /* 头部样式 */
        header {
            background: linear-gradient(135deg, #1a5fb4 0%, #1c71d8 100%);
            color: white;
            padding: 15px 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            display: flex;
            align-items: center;
        }
        
        .logo img {
            height: 50px;
            width: auto;
            margin-right: 15px;
            object-fit: contain;
            border-radius: 3px;
        }
        
        .logo h1 {
            font-size: 24px;
            font-weight: bold;
            line-height: 1;
        }
        
        nav ul {
            display: flex;
            list-style: none;
            align-items: center;
        }
        
        nav ul li {
            margin-left: 20px;
            position: relative;
        }
        
        nav ul li a {
            color: white;
            text-decoration: none;
            padding: 10px 15px;
            border-radius: 5px;
            transition: background-color 0.3s;
            display: inline-block;
        }
        
        nav ul li a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
        
        .search-box {
            display: flex;
            align-items: center;
            background: white;
            border-radius: 20px;
            padding: 5px 15px;
            margin-left: 30px;
        }
        
        .search-box input {
            border: none;
            outline: none;
            padding: 8px 0;
            width: 200px;
            background: transparent;
            text-align: left;
        }
        
        .search-box button {
            background: none;
            border: none;
            cursor: pointer;
            color: #1a5fb4;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 登录表单样式 */
        .main-content {
            padding: 50px 0;
            min-height: 60vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .login-container {
            background: white;
            border-radius: 10px;
            padding: 40px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 450px;
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-title {
            color: #1a5fb4;
            font-size: 28px;
            margin-bottom: 10px;
        }
        
        .login-subtitle {
            color: #666;
            font-size: 16px;
        }
        
        .login-form {
            width: 100%;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #555;
        }
        
        .form-input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            background-color: #f8f9fa;
            font-size: 16px;
            transition: all 0.3s;
        }
        
        .form-input:focus {
            outline: none;
            border-color: #1a5fb4;
            background-color: white;
            box-shadow: 0 0 0 2px rgba(26, 95, 180, 0.2);
        }
        
        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .remember-me {
            display: flex;
            align-items: center;
        }
        
        .remember-me input {
            margin-right: 8px;
        }
        
        .forgot-password {
            color: #1a5fb4;
            text-decoration: none;
            font-size: 14px;
        }
        
        .forgot-password:hover {
            text-decoration: underline;
        }
        
        .submit-btn {
            width: 100%;
            padding: 14px;
            background: #1a5fb4;
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s;
            margin-bottom: 20px;
        }
        
        .submit-btn:hover {
            background: #155293;
        }
        
        .login-footer {
            text-align: center;
            color: #666;
        }
        
        .login-footer a {
            color: #1a5fb4;
            text-decoration: none;
            font-weight: bold;
        }
        
        .login-footer a:hover {
            text-decoration: underline;
        }
        
        .divider {
            display: flex;
            align-items: center;
            margin: 25px 0;
            color: #999;
        }
        
        .divider::before,
        .divider::after {
            content: "";
            flex: 1;
            border-bottom: 1px solid #ddd;
        }
        
        .divider-text {
            padding: 0 15px;
            font-size: 14px;
        }
        
        .social-login {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
        }
        
        .social-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #f8f9fa;
            color: #555;
            text-decoration: none;
            transition: all 0.3s;
        }
        
        .social-btn:hover {
            background: #e9ecef;
            transform: translateY(-2px);
        }
        
        /* 底部样式 */
        footer {
            background: #2c2c2c;
            color: white;
            padding: 40px 0 20px;
        }
        
        .footer-content {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
        }
        
        .footer-section {
            flex: 1;
            padding: 0 20px;
        }
        
        .footer-section h3 {
            margin-bottom: 15px;
            color: #1c71d8;
            text-align: left;
            font-size: 18px;
        }
        
        .footer-section p {
            text-align: left;
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 8px;
        }
        
        .copyright {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid #444;
            font-size: 14px;
            line-height: 1.5;
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .login-container {
                padding: 30px 20px;
            }
            
            .form-options {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
        }
    </style>
</head>
<body>
    <!-- 头部 -->
    <header>
        <div class="container header-content">
            <div class="logo">
                <img src="湘信院logo.png" alt="湖南信息学院logo">
            </div>
            <nav>
                <ul>
                    <li><a href="首页.html">首页</a></li>
                    <li><a href="校园风貌.html">校园风貌</a></li>
                    <li><a href="学校新闻.html">学校新闻</a></li>
                    <li><a href="校园活动.html">校园活动</a></li>
                    <li><a href="领导关怀.html">领导关怀</a></li>
                    <li><a href="音影资料.html">音影资料</a></li>
                </ul>
            </nav>
            <div class="search-box">
                <input type="text" placeholder="搜索校园内容...">
                <button><i class="fas fa-search"></i></button>
            </div>
        </div>
    </header>

    <!-- 内容区 -->
    <div class="container main-content">
        <div class="login-container">
            <div class="login-header">
                <h2 class="login-title">用户登录</h2>
                <p class="login-subtitle">欢迎回到湖南信息学院</p>
            </div>
            
            <form class="login-form" id="loginForm">
                <div class="form-group">
                    <label class="form-label" for="username">学工号/用户名</label>
                    <input type="text" id="username" class="form-input" placeholder="请输入学工号或用户名" required>
                </div>
                
                <div class="form-group">
                    <label class="form-label" for="password">密码</label>
                    <input type="password" id="password" class="form-input" placeholder="请输入密码" required>
                </div>
                
                <div class="form-options">
                    <div class="remember-me">
                        <input type="checkbox" id="remember">
                        <label for="remember">记住密码</label>
                    </div>
                    <a href="忘记密码.html" class="forgot-password">忘记密码?</a>
                </div>
                
                <button type="submit" class="submit-btn">登录</button>
                
                <div class="login-footer">
                    <p>还没有账号？<a href="register.html">立即注册</a></p>
                </div>
                
                <div class="divider">
                    <span class="divider-text">或使用以下方式登录</span>
                </div>
                
                <div class="social-login">
                    <a href="#" class="social-btn">
                        <i class="fab fa-weixin"></i>
                    </a>
                    <a href="#" class="social-btn">
                        <i class="fab fa-qq"></i>
                    </a>
                    <a href="#" class="social-btn">
                        <i class="fab fa-weibo"></i>
                    </a>
                </div>
            </form>
        </div>
    </div>

    <!-- 底部 -->
    <footer>
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <h3>校园地址</h3>
                    <p>国家级长沙经济技术开发区毛塘工业园湖南信息学院</p>
                </div>
                <div class="footer-section">
                    <h3>联系电话</h3>
                    <p>招生办: 0731-84098666 </p>
                    <p>传真：0731-84098777</p>
                </div>
                <div class="footer-section">
                    <h3>快速链接</h3>
                    <p>校园信息系统</p>
                    <p>图书馆资源</p>
                    <p>教务管理系统</p>
                </div>
            </div>
            <div class="copyright">
                <p>&copy; 2025 湖南信息学院 版权所有 | 许可证号：A10010065</p>
            </div>
        </div>
    </footer>

    <script>
        // 表单提交验证
        document.getElementById('loginForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            const username = document.getElementById('username').value;
            const password = document.getElementById('password').value;
            
            if (!username || !password) {
                alert('请输入学工号和密码！');
                return;
            }
            
            // 模拟登录验证
            if (username === 'demo' && password === '123456') {
                alert('登录成功！');
                // 在实际应用中，这里应该跳转到用户中心或首页
                window.location.href = '个人中心.html';
            } else {
                alert('学工号或密码错误，请重试！');
            }
        });
        
        // 记住密码功能
        window.addEventListener('DOMContentLoaded', function() {
            const rememberCheckbox = document.getElementById('remember');
            const usernameInput = document.getElementById('username');
            const passwordInput = document.getElementById('password');
            
            // 检查本地存储中是否有保存的登录信息
            const savedUsername = localStorage.getItem('savedUsername');
            const savedPassword = localStorage.getItem('savedPassword');
            
            if (savedUsername && savedPassword) {
                usernameInput.value = savedUsername;
                passwordInput.value = savedPassword;
                rememberCheckbox.checked = true;
            }
            
            // 表单提交时处理记住密码
            document.getElementById('loginForm').addEventListener('submit', function() {
                if (rememberCheckbox.checked) {
                    localStorage.setItem('savedUsername', usernameInput.value);
                    localStorage.setItem('savedPassword', passwordInput.value);
                } else {
                    localStorage.removeItem('savedUsername');
                    localStorage.removeItem('savedPassword');
                }
            });
        });
    </script>
</body>
</html>